home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Mark Pilgrim / Kant Generator Pro 1.0.1 / source / kode new / kantinuous.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-30  |  867 b   |  35 lines  |  [TEXT/MMCC]

  1. #include "kantinuous.h"
  2. #include "kant parser dispatch.h"
  3. #include "error.h"
  4. #include "text twiddling.h"
  5. #include "program globals.h"
  6. #include "graphics.h"
  7. #include "window layer.h"
  8.  
  9. void Kantinuous(void)
  10. {
  11.     unsigned char    *sectionStr="\p§ion\r§ion\r§ion\r";
  12.     WindowPtr        mainWindow;
  13.     enum ErrorTypes    resultCode;
  14.     
  15.     mainWindow=GetIndWindowPtr(kMainWindow);
  16.     if (mainWindow!=0L)
  17.     {
  18.         MySelectWindow(mainWindow);
  19.         CloseTheWindow(mainWindow);
  20.     }
  21.     OpenTheIndWindow(kMainWindow);
  22.     mainWindow=GetIndWindowPtr(kMainWindow);
  23.     InsertAfterEnd(mainWindow, sectionStr);
  24.     while ((resultCode=ParserDispatch(mainWindow))==allsWell)
  25.     {
  26.         SetWindowIsModified(mainWindow, FALSE);
  27.         CloseTheWindow(mainWindow);
  28.         OpenTheIndWindow(kMainWindow);
  29.         mainWindow=GetIndWindowPtr(kMainWindow);
  30.         InsertAfterEnd(mainWindow, sectionStr);
  31.     }
  32.     
  33.     HandleError(resultCode, FALSE, TRUE);
  34. }
  35.